<?php
// 获取称号数据的API
header('Content-Type: application/json');

$titlesFile = __DIR__ . '/ch.json';
if (!file_exists($titlesFile)) {
    echo json_encode([]);
    exit();
}

$titlesData = json_decode(file_get_contents($titlesFile), true);
echo json_encode($titlesData ?: []);